<template>
  <div>
    <h2>Home组件内容</h2>
    <div>
      <ul class="nav nav-tabs">
        <li>
          <router-link
            replace
            class="list-group-item"
            active-class="active"
            to="/home/news"
            >News</router-link
          >
        </li>
        <li>
          <!-- 模版内的嵌套级路由 路径需完整(补全根路径) -->
          <router-link
            replace
            class="list-group-item"
            active-class="active"
            to="/home/message"
            >Message</router-link
          >
        </li>
      </ul>
      <!-- 缓存路由组件标签 <keep-alive>  -->
      <!-- include="具体路由组件名"可指定具体某个组件被缓存,其他组件不包含,不写该属性则默认缓存<keep-alive>下所有路由组件-->
      <keep-alive include="News">
        <router-view></router-view> 
        </keep-alive>
        <!-- <router-view></router-view>  -->

    </div>
  </div>
</template>
<script>
export default {
  name: "Home",
};
</script>